<?php
include_once($_SERVER['DOCUMENT_ROOT'] ."/include/user/inc.php");
include_once($_SERVER['DOCUMENT_ROOT'] ."/include/mblog/inc.php");
include_once($_SERVER['DOCUMENT_ROOT'] ."/include/album/inc.php");
include_once($_SERVER['DOCUMENT_ROOT'] ."/include/tuijian/inc.php");




//所有的参数
$g_cgival 	= array();
//存储中间数据 非输出数据 可以不用
$g_pro	 	= array();
//要显示的数据 输出数据
$g_show 	= array();

function check_cgi_pro()
{		
	global $g_cgival, $g_pro, $g_show, $config;
	cgi::both($g_cgival["uid"], "uid", "");
	$g_cgival["uid"] = intval($g_cgival["uid"]);
}


function get_data()
{
	global $g_cgival, $g_pro, $g_show, $config;
	
	$uid = $g_cgival["uid"];
	
	$db_user_info = new db_user_info();
	$user_info = $db_user_info->get_user_info_item_by_uid($uid);
	$g_show["user_info"] = $user_info;
	
	
}

try {
	$g_show['error'] = 0;
	$g_show['errmsg'] = "";
	check_cgi_pro();
	get_data();
	
} catch (Exception $e) {
	$g_show['error'] = 1;
	$g_show['errmsg'] = $e->getMessage();
}

show_pro();


exit;

function show_pro()
{
	global $g_cgival, $g_pro, $g_show, $config;

	$smarty = p_get_smarty();	
	$smarty->assign("g_show", $g_show);
	if (isset($_GET["debug"]))
	{
		print_r($g_show);
	}
	$smarty->display("user/my_index.html");

	if($_GET["debug"])
	{
		echo "<pre>";
		print_r($g_show);
	}
	unset($g_cgival);
	unset($g_pro);
	unset($g_show);
	unset($config);
	
}

